package com.monster.starter.core.listener;

import com.monster.starter.core.utils.SpringContextUtils;
import org.springframework.context.ApplicationListener;
import org.springframework.context.event.ContextRefreshedEvent;

/**
 * 上下文监听
 * @author kuang
 */
public class ApplicationContextListener implements ApplicationListener<ContextRefreshedEvent> {
    @Override
    public void onApplicationEvent(ContextRefreshedEvent event) {
        SpringContextUtils.setContext(event.getApplicationContext());
    }
}
